package com.mightybird.designpattern.creational.prototype.shallowclone;

public class CustomerS implements Cloneable {
    private String name;
    private AddressS address;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public AddressS getAddress() {
        return address;
    }

    public void setAddress(AddressS address) {
        this.address = address;
    }

    public CustomerS shallowClone() {
        Object object = null;
        try {
            object = super.clone();
            return (CustomerS) object;
        } catch (CloneNotSupportedException e) {
            System.out.println("Unsupported clone!");
            e.printStackTrace();
            return null;
        }
    }
}
